import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({

  routes: [
    {
      path: '/',
      redirect: 'home',
    },
    {
      // 首页
      path: '/home',
      name: 'home',
      component: () => import('@/views/home'),
    },
    {
      // 专题
      path: '/subject',
      name: 'subject',
      component: () => import('@/views/subject'),

    },
    {
      path: '/allCase',
      name: 'allCase',
      redirect: '/interact',
      component: () => import('@/views/allCase'),
      children: [
        {
          path: '/poster',
          name: 'poster',
          component: () => import('@/views/poster'),
          meta: { active: 3 }
        },
        {
          path: '/video',
          name: 'video',
          component: () => import('@/views/video'),
          meta: { active: 4 }
        },
        {
          path: '/longPic',
          name: 'longPic',
          component: () => import('@/views/longPic'),
          meta: { active: 2 }
        },
        {
          path: '/interact',
          name: 'interact',
          component: () => import('@/views/interact'),
          meta: { active: 1 }
        },
      ]
    },
    {
      path: '/interact',
      name: 'interact',
      component: () => import('@/views/interact'),
    },
    {
      path: '/poster',
      name: 'poster',
      component: () => import('@/views/poster'),
    },
    {
      path: '/search',
      name: 'search',
      component: () => import('@/views/search'),
    },
    {
      path: '/details',
      name: 'details',
      component: () => import('@/views/details'),
    },
    // {
    //   path: '/longPic',
    //   name: 'longPic',
    //   component: () => import('@/views/longPic'),
    // },
    {
      path: '/cooperation',
      name: 'cooperation',
      component: () => import('@/views/cooperation'),
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('@/views/about'),
    }
  ]
});
